<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateSystemMenuTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_menu', function (Blueprint $table) {
            $table->id();
            $table->string("name")->comment("权限名字，给tp用的");
            $table->string("group")->comment("所属分组");
            $table->string("right")->comment("权限码（控制器+动作）");
            $table->boolean("is_del")->comment("删除状态")->default(false);
        });
        DB::statement("ALTER TABLE `system_menu` comment'TP的权限表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_menu');
    }
}
